mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
22 lines
393 B
JavaScript
22 lines
393 B
JavaScript
const BaseModel = require('./BaseModel');
|
|
const Utils = require('../Utils');
|
|
|
|
class UserKeys extends BaseModel {
|
|
all(userId) {
|
|
const uId = Utils.parse(userId);
|
|
|
|
return this.get(`users/${uId}/keys`);
|
|
}
|
|
|
|
addKey(userId, title, key) {
|
|
const uId = Utils.parse(userId);
|
|
|
|
return this.post(`users/${uId}/keys`, {
|
|
title,
|
|
key,
|
|
});
|
|
}
|
|
}
|
|
|
|
module.exports = UserKeys;
|